﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract KnjizenjeStavka typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class KnjizenjeStavkaDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<KnjizenjeStavkaDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.KnjizenjeStavka _currentKnjizenjeStavka = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxKnjizenjeStavkaDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxKnjizenjeStavkaErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxKnjizenjeStavkaBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDKonto property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDKontoDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDOrganizacija property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDOrganizacijaDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDVrstaFinDokumenta property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDVrstaFinDokumentaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumDokumentaOriginal property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumDokumentaOriginalDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumDokumentaPromjenjen property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumDokumentaPromjenjenDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Nalog property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxNalogDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the OpisKnjizenja property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxOpisKnjizenjaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Dug property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDugDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Pot property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxPotDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDKlijent property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDKlijentDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the SifraOriginalnogDokumenta property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxSifraOriginalnogDokumentaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumDospijeca property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumDospijecaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the PlacanjeModel property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxPlacanjeModelDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the PlacanjePoziv property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxPlacanjePozivDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDKnjizenja property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDKnjizenjaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumCreated property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumCreatedDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumModified property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumModifiedDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDUserCreated property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDUserCreatedDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDUserModified property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDUserModifiedDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the PrikazUKnjizi property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxPrikazUKnjiziDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DateUICreated property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDateUICreatedDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the KontoSifraPrijenos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxKontoSifraPrijenosDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDDokument property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDDokumentDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Calculated property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxCalculatedDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.Djelatnik> _IDUserCreatedList;
		
		/// <summary> 
		/// The list of selectable Djelatnik
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Djelatnik> IDUserCreatedList
		{
			get {return this._IDUserCreatedList;}
			set 
			{
				this._IDUserCreatedList = value;
				this.uxIDUserCreatedDataGridViewColumn.DataSource = null;
				this.uxIDUserCreatedDataGridViewColumn.DataSource = this._IDUserCreatedList;
			}
		}
		
		private bool _allowNewItemInIDUserCreatedList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Djelatnik
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDUserCreatedList
		{
			get { return _allowNewItemInIDUserCreatedList;}
			set
			{
				this._allowNewItemInIDUserCreatedList = value;
				this.uxIDUserCreatedDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Djelatnik> _IDUserModifiedList;
		
		/// <summary> 
		/// The list of selectable Djelatnik
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Djelatnik> IDUserModifiedList
		{
			get {return this._IDUserModifiedList;}
			set 
			{
				this._IDUserModifiedList = value;
				this.uxIDUserModifiedDataGridViewColumn.DataSource = null;
				this.uxIDUserModifiedDataGridViewColumn.DataSource = this._IDUserModifiedList;
			}
		}
		
		private bool _allowNewItemInIDUserModifiedList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Djelatnik
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDUserModifiedList
		{
			get { return _allowNewItemInIDUserModifiedList;}
			set
			{
				this._allowNewItemInIDUserModifiedList = value;
				this.uxIDUserModifiedDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Dokument> _IDDokumentList;
		
		/// <summary> 
		/// The list of selectable Dokument
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Dokument> IDDokumentList
		{
			get {return this._IDDokumentList;}
			set 
			{
				this._IDDokumentList = value;
				this.uxIDDokumentDataGridViewColumn.DataSource = null;
				this.uxIDDokumentDataGridViewColumn.DataSource = this._IDDokumentList;
			}
		}
		
		private bool _allowNewItemInIDDokumentList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Dokument
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDDokumentList
		{
			get { return _allowNewItemInIDDokumentList;}
			set
			{
				this._allowNewItemInIDDokumentList = value;
				this.uxIDDokumentDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Klijent> _IDKlijentList;
		
		/// <summary> 
		/// The list of selectable Klijent
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Klijent> IDKlijentList
		{
			get {return this._IDKlijentList;}
			set 
			{
				this._IDKlijentList = value;
				this.uxIDKlijentDataGridViewColumn.DataSource = null;
				this.uxIDKlijentDataGridViewColumn.DataSource = this._IDKlijentList;
			}
		}
		
		private bool _allowNewItemInIDKlijentList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Klijent
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDKlijentList
		{
			get { return _allowNewItemInIDKlijentList;}
			set
			{
				this._allowNewItemInIDKlijentList = value;
				this.uxIDKlijentDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Knjizenje> _IDKnjizenjaList;
		
		/// <summary> 
		/// The list of selectable Knjizenje
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Knjizenje> IDKnjizenjaList
		{
			get {return this._IDKnjizenjaList;}
			set 
			{
				this._IDKnjizenjaList = value;
				this.uxIDKnjizenjaDataGridViewColumn.DataSource = null;
				this.uxIDKnjizenjaDataGridViewColumn.DataSource = this._IDKnjizenjaList;
			}
		}
		
		private bool _allowNewItemInIDKnjizenjaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Knjizenje
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDKnjizenjaList
		{
			get { return _allowNewItemInIDKnjizenjaList;}
			set
			{
				this._allowNewItemInIDKnjizenjaList = value;
				this.uxIDKnjizenjaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Konto> _IDKontoList;
		
		/// <summary> 
		/// The list of selectable Konto
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Konto> IDKontoList
		{
			get {return this._IDKontoList;}
			set 
			{
				this._IDKontoList = value;
				this.uxIDKontoDataGridViewColumn.DataSource = null;
				this.uxIDKontoDataGridViewColumn.DataSource = this._IDKontoList;
			}
		}
		
		private bool _allowNewItemInIDKontoList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Konto
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDKontoList
		{
			get { return _allowNewItemInIDKontoList;}
			set
			{
				this._allowNewItemInIDKontoList = value;
				this.uxIDKontoDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Organizacija> _IDOrganizacijaList;
		
		/// <summary> 
		/// The list of selectable Organizacija
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Organizacija> IDOrganizacijaList
		{
			get {return this._IDOrganizacijaList;}
			set 
			{
				this._IDOrganizacijaList = value;
				this.uxIDOrganizacijaDataGridViewColumn.DataSource = null;
				this.uxIDOrganizacijaDataGridViewColumn.DataSource = this._IDOrganizacijaList;
			}
		}
		
		private bool _allowNewItemInIDOrganizacijaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Organizacija
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDOrganizacijaList
		{
			get { return _allowNewItemInIDOrganizacijaList;}
			set
			{
				this._allowNewItemInIDOrganizacijaList = value;
				this.uxIDOrganizacijaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.VrstaFinDokumenta> _IDVrstaFinDokumentaList;
		
		/// <summary> 
		/// The list of selectable VrstaFinDokumenta
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.VrstaFinDokumenta> IDVrstaFinDokumentaList
		{
			get {return this._IDVrstaFinDokumentaList;}
			set 
			{
				this._IDVrstaFinDokumentaList = value;
				this.uxIDVrstaFinDokumentaDataGridViewColumn.DataSource = null;
				this.uxIDVrstaFinDokumentaDataGridViewColumn.DataSource = this._IDVrstaFinDokumentaList;
			}
		}
		
		private bool _allowNewItemInIDVrstaFinDokumentaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of VrstaFinDokumenta
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDVrstaFinDokumentaList
		{
			get { return _allowNewItemInIDVrstaFinDokumentaList;}
			set
			{
				this._allowNewItemInIDVrstaFinDokumentaList = value;
				this.uxIDVrstaFinDokumentaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.KnjizenjeStavka> _KnjizenjeStavkaList;
				
		/// <summary> 
		/// The list of KnjizenjeStavka to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.KnjizenjeStavka> KnjizenjeStavkaList
		{
			get {return this._KnjizenjeStavkaList;}
			set
			{
				this._KnjizenjeStavkaList = value;
				this.uxKnjizenjeStavkaBindingSource.DataSource = null;
				this.uxKnjizenjeStavkaBindingSource.DataSource = value;
				this.uxKnjizenjeStavkaDataGridView.DataSource = null;
				this.uxKnjizenjeStavkaDataGridView.DataSource = this.uxKnjizenjeStavkaBindingSource;				
				//this.uxKnjizenjeStavkaBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxKnjizenjeStavkaBindingSource_ListChanged);
				this.uxKnjizenjeStavkaBindingSource.CurrentItemChanged += new System.EventHandler(OnKnjizenjeStavkaBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnKnjizenjeStavkaBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentKnjizenjeStavka = uxKnjizenjeStavkaBindingSource.Current as Entities.KnjizenjeStavka;
			
			if (_currentKnjizenjeStavka != null)
			{
				_currentKnjizenjeStavka.Validate();
			}
			//_KnjizenjeStavka.Validate();
			OnCurrentEntityChanged();
		}

		//void uxKnjizenjeStavkaBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.KnjizenjeStavka"/> instance.
		/// </summary>
		public Entities.KnjizenjeStavka SelectedKnjizenjeStavka
		{
			get {return this._currentKnjizenjeStavka;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxKnjizenjeStavkaDataGridView.VirtualMode;}
			set
			{
				this.uxKnjizenjeStavkaDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxKnjizenjeStavkaDataGridView.AllowUserToAddRows;}
			set {this.uxKnjizenjeStavkaDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxKnjizenjeStavkaDataGridView.AllowUserToDeleteRows;}
			set {this.uxKnjizenjeStavkaDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxKnjizenjeStavkaDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxKnjizenjeStavkaDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="KnjizenjeStavkaDataGridViewBase"/> class.
		/// </summary>
		public KnjizenjeStavkaDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxKnjizenjeStavkaDataGridView = new System.Windows.Forms.DataGridView();
			this.uxKnjizenjeStavkaBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxKnjizenjeStavkaErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDKontoDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDOrganizacijaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDVrstaFinDokumentaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxDatumDokumentaOriginalDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDatumDokumentaPromjenjenDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxNalogDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxOpisKnjizenjaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDugDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxPotDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDKlijentDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxSifraOriginalnogDokumentaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDatumDospijecaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxPlacanjeModelDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxPlacanjePozivDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDKnjizenjaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxDatumCreatedDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDatumModifiedDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDUserCreatedDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDUserModifiedDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxPrikazUKnjiziDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDateUICreatedDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxKontoSifraPrijenosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDDokumentDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxCalculatedDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDUserCreatedBindingSource = new DjelatnikBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDUserCreatedBindingSource)).BeginInit();
			//this.uxIDUserModifiedBindingSource = new DjelatnikBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDUserModifiedBindingSource)).BeginInit();
			//this.uxIDDokumentBindingSource = new DokumentBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDDokumentBindingSource)).BeginInit();
			//this.uxIDKlijentBindingSource = new KlijentBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKlijentBindingSource)).BeginInit();
			//this.uxIDKnjizenjaBindingSource = new KnjizenjeBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKnjizenjaBindingSource)).BeginInit();
			//this.uxIDKontoBindingSource = new KontoBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKontoBindingSource)).BeginInit();
			//this.uxIDOrganizacijaBindingSource = new OrganizacijaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDOrganizacijaBindingSource)).BeginInit();
			//this.uxIDVrstaFinDokumentaBindingSource = new VrstaFinDokumentaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDVrstaFinDokumentaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKnjizenjeStavkaDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKnjizenjeStavkaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKnjizenjeStavkaErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxKnjizenjeStavkaErrorProvider
			// 
			this.uxKnjizenjeStavkaErrorProvider.ContainerControl = this;
			this.uxKnjizenjeStavkaErrorProvider.DataSource = this.uxKnjizenjeStavkaBindingSource;						
			// 
			// uxKnjizenjeStavkaDataGridView
			// 
			this.uxKnjizenjeStavkaDataGridView.AutoGenerateColumns = false;
			this.uxKnjizenjeStavkaDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxKnjizenjeStavkaDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxIDKontoDataGridViewColumn,
		this.uxIDOrganizacijaDataGridViewColumn,
		this.uxIDVrstaFinDokumentaDataGridViewColumn,
		this.uxDatumDokumentaOriginalDataGridViewColumn,
		this.uxDatumDokumentaPromjenjenDataGridViewColumn,
		this.uxNalogDataGridViewColumn,
		this.uxOpisKnjizenjaDataGridViewColumn,
		this.uxDugDataGridViewColumn,
		this.uxPotDataGridViewColumn,
		this.uxIDKlijentDataGridViewColumn,
		this.uxSifraOriginalnogDokumentaDataGridViewColumn,
		this.uxDatumDospijecaDataGridViewColumn,
		this.uxPlacanjeModelDataGridViewColumn,
		this.uxPlacanjePozivDataGridViewColumn,
		this.uxIDKnjizenjaDataGridViewColumn,
		this.uxDatumCreatedDataGridViewColumn,
		this.uxDatumModifiedDataGridViewColumn,
		this.uxIDUserCreatedDataGridViewColumn,
		this.uxIDUserModifiedDataGridViewColumn,
		this.uxPrikazUKnjiziDataGridViewColumn,
		this.uxDateUICreatedDataGridViewColumn,
		this.uxKontoSifraPrijenosDataGridViewColumn,
		this.uxIDDokumentDataGridViewColumn,
		this.uxCalculatedDataGridViewColumn			});
			this.uxKnjizenjeStavkaDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxKnjizenjeStavkaDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxKnjizenjeStavkaDataGridView.Name = "uxKnjizenjeStavkaDataGridView";
			this.uxKnjizenjeStavkaDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxKnjizenjeStavkaDataGridView.TabIndex = 0;	
			this.uxKnjizenjeStavkaDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxKnjizenjeStavkaDataGridView.EnableHeadersVisualStyles = false;
			this.uxKnjizenjeStavkaDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnKnjizenjeStavkaDataGridViewDataError);
			this.uxKnjizenjeStavkaDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnKnjizenjeStavkaDataGridViewCellValueNeeded);
			this.uxKnjizenjeStavkaDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnKnjizenjeStavkaDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDKontoDataGridViewColumn
			//
			this.uxIDKontoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDKontoDataGridViewColumn.DataPropertyName = "IDKonto";
			this.uxIDKontoDataGridViewColumn.HeaderText = "IDKonto";
			this.uxIDKontoDataGridViewColumn.Name = "uxIDKontoDataGridViewColumn";
			this.uxIDKontoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDKontoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDKontoDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDOrganizacijaDataGridViewColumn
			//
			this.uxIDOrganizacijaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDOrganizacijaDataGridViewColumn.DataPropertyName = "IDOrganizacija";
			this.uxIDOrganizacijaDataGridViewColumn.HeaderText = "IDOrganizacija";
			this.uxIDOrganizacijaDataGridViewColumn.Name = "uxIDOrganizacijaDataGridViewColumn";
			this.uxIDOrganizacijaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDOrganizacijaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDOrganizacijaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDVrstaFinDokumentaDataGridViewColumn
			//
			this.uxIDVrstaFinDokumentaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDVrstaFinDokumentaDataGridViewColumn.DataPropertyName = "IDVrstaFinDokumenta";
			this.uxIDVrstaFinDokumentaDataGridViewColumn.HeaderText = "IDVrstaFinDokumenta";
			this.uxIDVrstaFinDokumentaDataGridViewColumn.Name = "uxIDVrstaFinDokumentaDataGridViewColumn";
			this.uxIDVrstaFinDokumentaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDVrstaFinDokumentaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDVrstaFinDokumentaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumDokumentaOriginalDataGridViewColumn
			//
			this.uxDatumDokumentaOriginalDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumDokumentaOriginalDataGridViewColumn.DataPropertyName = "DatumDokumentaOriginal";
			this.uxDatumDokumentaOriginalDataGridViewColumn.HeaderText = "DatumDokumentaOriginal";
			this.uxDatumDokumentaOriginalDataGridViewColumn.Name = "uxDatumDokumentaOriginalDataGridViewColumn";
			this.uxDatumDokumentaOriginalDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumDokumentaOriginalDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumDokumentaOriginalDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumDokumentaPromjenjenDataGridViewColumn
			//
			this.uxDatumDokumentaPromjenjenDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumDokumentaPromjenjenDataGridViewColumn.DataPropertyName = "DatumDokumentaPromjenjen";
			this.uxDatumDokumentaPromjenjenDataGridViewColumn.HeaderText = "DatumDokumentaPromjenjen";
			this.uxDatumDokumentaPromjenjenDataGridViewColumn.Name = "uxDatumDokumentaPromjenjenDataGridViewColumn";
			this.uxDatumDokumentaPromjenjenDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumDokumentaPromjenjenDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumDokumentaPromjenjenDataGridViewColumn.ReadOnly = false;		
			//
			// uxNalogDataGridViewColumn
			//
			this.uxNalogDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxNalogDataGridViewColumn.DataPropertyName = "Nalog";
			this.uxNalogDataGridViewColumn.HeaderText = "Nalog";
			this.uxNalogDataGridViewColumn.Name = "uxNalogDataGridViewColumn";
			this.uxNalogDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxNalogDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxNalogDataGridViewColumn.ReadOnly = false;		
			//
			// uxOpisKnjizenjaDataGridViewColumn
			//
			this.uxOpisKnjizenjaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxOpisKnjizenjaDataGridViewColumn.DataPropertyName = "OpisKnjizenja";
			this.uxOpisKnjizenjaDataGridViewColumn.HeaderText = "OpisKnjizenja";
			this.uxOpisKnjizenjaDataGridViewColumn.Name = "uxOpisKnjizenjaDataGridViewColumn";
			this.uxOpisKnjizenjaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxOpisKnjizenjaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxOpisKnjizenjaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDugDataGridViewColumn
			//
			this.uxDugDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDugDataGridViewColumn.DataPropertyName = "Dug";
			this.uxDugDataGridViewColumn.HeaderText = "Dug";
			this.uxDugDataGridViewColumn.Name = "uxDugDataGridViewColumn";
			this.uxDugDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDugDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDugDataGridViewColumn.ReadOnly = false;		
			//
			// uxPotDataGridViewColumn
			//
			this.uxPotDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxPotDataGridViewColumn.DataPropertyName = "Pot";
			this.uxPotDataGridViewColumn.HeaderText = "Pot";
			this.uxPotDataGridViewColumn.Name = "uxPotDataGridViewColumn";
			this.uxPotDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxPotDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxPotDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDKlijentDataGridViewColumn
			//
			this.uxIDKlijentDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDKlijentDataGridViewColumn.DataPropertyName = "IDKlijent";
			this.uxIDKlijentDataGridViewColumn.HeaderText = "IDKlijent";
			this.uxIDKlijentDataGridViewColumn.Name = "uxIDKlijentDataGridViewColumn";
			this.uxIDKlijentDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDKlijentDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDKlijentDataGridViewColumn.ReadOnly = false;		
			//
			// uxSifraOriginalnogDokumentaDataGridViewColumn
			//
			this.uxSifraOriginalnogDokumentaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxSifraOriginalnogDokumentaDataGridViewColumn.DataPropertyName = "SifraOriginalnogDokumenta";
			this.uxSifraOriginalnogDokumentaDataGridViewColumn.HeaderText = "SifraOriginalnogDokumenta";
			this.uxSifraOriginalnogDokumentaDataGridViewColumn.Name = "uxSifraOriginalnogDokumentaDataGridViewColumn";
			this.uxSifraOriginalnogDokumentaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxSifraOriginalnogDokumentaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxSifraOriginalnogDokumentaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumDospijecaDataGridViewColumn
			//
			this.uxDatumDospijecaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumDospijecaDataGridViewColumn.DataPropertyName = "DatumDospijeca";
			this.uxDatumDospijecaDataGridViewColumn.HeaderText = "DatumDospijeca";
			this.uxDatumDospijecaDataGridViewColumn.Name = "uxDatumDospijecaDataGridViewColumn";
			this.uxDatumDospijecaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumDospijecaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumDospijecaDataGridViewColumn.ReadOnly = false;		
			//
			// uxPlacanjeModelDataGridViewColumn
			//
			this.uxPlacanjeModelDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxPlacanjeModelDataGridViewColumn.DataPropertyName = "PlacanjeModel";
			this.uxPlacanjeModelDataGridViewColumn.HeaderText = "PlacanjeModel";
			this.uxPlacanjeModelDataGridViewColumn.Name = "uxPlacanjeModelDataGridViewColumn";
			this.uxPlacanjeModelDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxPlacanjeModelDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxPlacanjeModelDataGridViewColumn.ReadOnly = false;		
			//
			// uxPlacanjePozivDataGridViewColumn
			//
			this.uxPlacanjePozivDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxPlacanjePozivDataGridViewColumn.DataPropertyName = "PlacanjePoziv";
			this.uxPlacanjePozivDataGridViewColumn.HeaderText = "PlacanjePoziv";
			this.uxPlacanjePozivDataGridViewColumn.Name = "uxPlacanjePozivDataGridViewColumn";
			this.uxPlacanjePozivDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxPlacanjePozivDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxPlacanjePozivDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDKnjizenjaDataGridViewColumn
			//
			this.uxIDKnjizenjaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDKnjizenjaDataGridViewColumn.DataPropertyName = "IDKnjizenja";
			this.uxIDKnjizenjaDataGridViewColumn.HeaderText = "IDKnjizenja";
			this.uxIDKnjizenjaDataGridViewColumn.Name = "uxIDKnjizenjaDataGridViewColumn";
			this.uxIDKnjizenjaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDKnjizenjaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDKnjizenjaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumCreatedDataGridViewColumn
			//
			this.uxDatumCreatedDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumCreatedDataGridViewColumn.DataPropertyName = "DatumCreated";
			this.uxDatumCreatedDataGridViewColumn.HeaderText = "DatumCreated";
			this.uxDatumCreatedDataGridViewColumn.Name = "uxDatumCreatedDataGridViewColumn";
			this.uxDatumCreatedDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumCreatedDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumCreatedDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumModifiedDataGridViewColumn
			//
			this.uxDatumModifiedDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumModifiedDataGridViewColumn.DataPropertyName = "DatumModified";
			this.uxDatumModifiedDataGridViewColumn.HeaderText = "DatumModified";
			this.uxDatumModifiedDataGridViewColumn.Name = "uxDatumModifiedDataGridViewColumn";
			this.uxDatumModifiedDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumModifiedDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumModifiedDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDUserCreatedDataGridViewColumn
			//
			this.uxIDUserCreatedDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDUserCreatedDataGridViewColumn.DataPropertyName = "IDUserCreated";
			this.uxIDUserCreatedDataGridViewColumn.HeaderText = "IDUserCreated";
			this.uxIDUserCreatedDataGridViewColumn.Name = "uxIDUserCreatedDataGridViewColumn";
			this.uxIDUserCreatedDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDUserCreatedDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDUserCreatedDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDUserModifiedDataGridViewColumn
			//
			this.uxIDUserModifiedDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDUserModifiedDataGridViewColumn.DataPropertyName = "IDUserModified";
			this.uxIDUserModifiedDataGridViewColumn.HeaderText = "IDUserModified";
			this.uxIDUserModifiedDataGridViewColumn.Name = "uxIDUserModifiedDataGridViewColumn";
			this.uxIDUserModifiedDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDUserModifiedDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDUserModifiedDataGridViewColumn.ReadOnly = false;		
			//
			// uxPrikazUKnjiziDataGridViewColumn
			//
			this.uxPrikazUKnjiziDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxPrikazUKnjiziDataGridViewColumn.DataPropertyName = "PrikazUKnjizi";
			this.uxPrikazUKnjiziDataGridViewColumn.HeaderText = "PrikazUKnjizi";
			this.uxPrikazUKnjiziDataGridViewColumn.Name = "uxPrikazUKnjiziDataGridViewColumn";
			this.uxPrikazUKnjiziDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxPrikazUKnjiziDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxPrikazUKnjiziDataGridViewColumn.ReadOnly = false;		
			//
			// uxDateUICreatedDataGridViewColumn
			//
			this.uxDateUICreatedDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDateUICreatedDataGridViewColumn.DataPropertyName = "DateUICreated";
			this.uxDateUICreatedDataGridViewColumn.HeaderText = "DateUICreated";
			this.uxDateUICreatedDataGridViewColumn.Name = "uxDateUICreatedDataGridViewColumn";
			this.uxDateUICreatedDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDateUICreatedDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDateUICreatedDataGridViewColumn.ReadOnly = false;		
			//
			// uxKontoSifraPrijenosDataGridViewColumn
			//
			this.uxKontoSifraPrijenosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxKontoSifraPrijenosDataGridViewColumn.DataPropertyName = "KontoSifraPrijenos";
			this.uxKontoSifraPrijenosDataGridViewColumn.HeaderText = "KontoSifraPrijenos";
			this.uxKontoSifraPrijenosDataGridViewColumn.Name = "uxKontoSifraPrijenosDataGridViewColumn";
			this.uxKontoSifraPrijenosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxKontoSifraPrijenosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxKontoSifraPrijenosDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDDokumentDataGridViewColumn
			//
			this.uxIDDokumentDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDokumentDataGridViewColumn.DataPropertyName = "IDDokument";
			this.uxIDDokumentDataGridViewColumn.HeaderText = "IDDokument";
			this.uxIDDokumentDataGridViewColumn.Name = "uxIDDokumentDataGridViewColumn";
			this.uxIDDokumentDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDokumentDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDokumentDataGridViewColumn.ReadOnly = false;		
			//
			// uxCalculatedDataGridViewColumn
			//
			this.uxCalculatedDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxCalculatedDataGridViewColumn.DataPropertyName = "Calculated";
			this.uxCalculatedDataGridViewColumn.HeaderText = "Calculated";
			this.uxCalculatedDataGridViewColumn.Name = "uxCalculatedDataGridViewColumn";
			this.uxCalculatedDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxCalculatedDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxCalculatedDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDUserCreatedDataGridViewColumn
			//				
			this.uxIDUserCreatedDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDUserCreatedDataGridViewColumn.ValueMember = "ID";	
			this.uxIDUserCreatedDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDUserCreatedDataGridViewColumn.DataSource = uxIDUserCreatedBindingSource;				
				
			//
			// uxIDUserModifiedDataGridViewColumn
			//				
			this.uxIDUserModifiedDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDUserModifiedDataGridViewColumn.ValueMember = "ID";	
			this.uxIDUserModifiedDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDUserModifiedDataGridViewColumn.DataSource = uxIDUserModifiedBindingSource;				
				
			//
			// uxIDDokumentDataGridViewColumn
			//				
			this.uxIDDokumentDataGridViewColumn.DisplayMember = "IDDokumentTip";	
			this.uxIDDokumentDataGridViewColumn.ValueMember = "ID";	
			this.uxIDDokumentDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDDokumentDataGridViewColumn.DataSource = uxIDDokumentBindingSource;				
				
			//
			// uxIDKlijentDataGridViewColumn
			//				
			this.uxIDKlijentDataGridViewColumn.DisplayMember = "ImeKlijenta";	
			this.uxIDKlijentDataGridViewColumn.ValueMember = "ID";	
			this.uxIDKlijentDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDKlijentDataGridViewColumn.DataSource = uxIDKlijentBindingSource;				
				
			//
			// uxIDKnjizenjaDataGridViewColumn
			//				
			this.uxIDKnjizenjaDataGridViewColumn.DisplayMember = "Datum";	
			this.uxIDKnjizenjaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDKnjizenjaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDKnjizenjaDataGridViewColumn.DataSource = uxIDKnjizenjaBindingSource;				
				
			//
			// uxIDKontoDataGridViewColumn
			//				
			this.uxIDKontoDataGridViewColumn.DisplayMember = "Sifra";	
			this.uxIDKontoDataGridViewColumn.ValueMember = "ID";	
			this.uxIDKontoDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDKontoDataGridViewColumn.DataSource = uxIDKontoBindingSource;				
				
			//
			// uxIDOrganizacijaDataGridViewColumn
			//				
			this.uxIDOrganizacijaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDOrganizacijaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDOrganizacijaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDOrganizacijaDataGridViewColumn.DataSource = uxIDOrganizacijaBindingSource;				
				
			//
			// uxIDVrstaFinDokumentaDataGridViewColumn
			//				
			this.uxIDVrstaFinDokumentaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDVrstaFinDokumentaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDVrstaFinDokumentaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDVrstaFinDokumentaDataGridViewColumn.DataSource = uxIDVrstaFinDokumentaBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxKnjizenjeStavkaDataGridView);
			this.Name = "KnjizenjeStavkaDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDUserCreatedBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDUserModifiedBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDDokumentBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKlijentBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKnjizenjaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDKontoBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDOrganizacijaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDVrstaFinDokumentaBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKnjizenjeStavkaErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKnjizenjeStavkaDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxKnjizenjeStavkaBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				KnjizenjeStavkaDataGridViewEventArgs args = new KnjizenjeStavkaDataGridViewEventArgs();
				args.KnjizenjeStavka = _currentKnjizenjeStavka;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class KnjizenjeStavkaDataGridViewEventArgs : System.EventArgs
		{
			private Entities.KnjizenjeStavka	_KnjizenjeStavka;
	
			/// <summary>
			/// the  Entities.KnjizenjeStavka instance.
			/// </summary>
			public Entities.KnjizenjeStavka KnjizenjeStavka
			{
				get { return _KnjizenjeStavka; }
				set { _KnjizenjeStavka = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxKnjizenjeStavkaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnKnjizenjeStavkaDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxKnjizenjeStavkaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnKnjizenjeStavkaDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxKnjizenjeStavkaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].ID;
						break;
					case "uxIDKontoDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].IDKonto;
						break;
					case "uxIDOrganizacijaDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].IDOrganizacija;
						break;
					case "uxIDVrstaFinDokumentaDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].IDVrstaFinDokumenta;
						break;
					case "uxDatumDokumentaOriginalDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].DatumDokumentaOriginal;
						break;
					case "uxDatumDokumentaPromjenjenDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].DatumDokumentaPromjenjen;
						break;
					case "uxNalogDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].Nalog;
						break;
					case "uxOpisKnjizenjaDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].OpisKnjizenja;
						break;
					case "uxDugDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].Dug;
						break;
					case "uxPotDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].Pot;
						break;
					case "uxIDKlijentDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].IDKlijent;
						break;
					case "uxSifraOriginalnogDokumentaDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].SifraOriginalnogDokumenta;
						break;
					case "uxDatumDospijecaDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].DatumDospijeca;
						break;
					case "uxPlacanjeModelDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].PlacanjeModel;
						break;
					case "uxPlacanjePozivDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].PlacanjePoziv;
						break;
					case "uxIDKnjizenjaDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].IDKnjizenja;
						break;
					case "uxDatumCreatedDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].DatumCreated;
						break;
					case "uxDatumModifiedDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].DatumModified;
						break;
					case "uxIDUserCreatedDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].IDUserCreated;
						break;
					case "uxIDUserModifiedDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].IDUserModified;
						break;
					case "uxPrikazUKnjiziDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].PrikazUKnjizi;
						break;
					case "uxDateUICreatedDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].DateUICreated;
						break;
					case "uxKontoSifraPrijenosDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].KontoSifraPrijenos;
						break;
					case "uxIDDokumentDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].IDDokument;
						break;
					case "uxCalculatedDataGridViewColumn":
						e.Value = KnjizenjeStavkaList[e.RowIndex].Calculated;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxKnjizenjeStavkaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnKnjizenjeStavkaDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxKnjizenjeStavkaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxIDKontoDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].IDKonto = (System.Int32)e.Value;
						break;
					case "uxIDOrganizacijaDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].IDOrganizacija = (System.Int32)e.Value;
						break;
					case "uxIDVrstaFinDokumentaDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].IDVrstaFinDokumenta = (System.Int32)e.Value;
						break;
					case "uxDatumDokumentaOriginalDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].DatumDokumentaOriginal = (System.DateTime)e.Value;
						break;
					case "uxDatumDokumentaPromjenjenDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].DatumDokumentaPromjenjen = (System.DateTime?)e.Value;
						break;
					case "uxNalogDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].Nalog = (System.String)e.Value;
						break;
					case "uxOpisKnjizenjaDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].OpisKnjizenja = (System.String)e.Value;
						break;
					case "uxDugDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].Dug = (System.Decimal)e.Value;
						break;
					case "uxPotDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].Pot = (System.Decimal)e.Value;
						break;
					case "uxIDKlijentDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].IDKlijent = (System.Int32?)e.Value;
						break;
					case "uxSifraOriginalnogDokumentaDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].SifraOriginalnogDokumenta = (System.String)e.Value;
						break;
					case "uxDatumDospijecaDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].DatumDospijeca = (System.DateTime?)e.Value;
						break;
					case "uxPlacanjeModelDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].PlacanjeModel = (System.String)e.Value;
						break;
					case "uxPlacanjePozivDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].PlacanjePoziv = (System.String)e.Value;
						break;
					case "uxIDKnjizenjaDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].IDKnjizenja = (System.Int32)e.Value;
						break;
					case "uxDatumCreatedDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].DatumCreated = (System.DateTime)e.Value;
						break;
					case "uxDatumModifiedDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].DatumModified = (System.DateTime)e.Value;
						break;
					case "uxIDUserCreatedDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].IDUserCreated = (System.Int32)e.Value;
						break;
					case "uxIDUserModifiedDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].IDUserModified = (System.Int32)e.Value;
						break;
					case "uxPrikazUKnjiziDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].PrikazUKnjizi = (System.Int32)e.Value;
						break;
					case "uxDateUICreatedDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].DateUICreated = (System.DateTime)e.Value;
						break;
					case "uxKontoSifraPrijenosDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].KontoSifraPrijenos = (System.String)e.Value;
						break;
					case "uxIDDokumentDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].IDDokument = (System.Int32?)e.Value;
						break;
					case "uxCalculatedDataGridViewColumn":
						KnjizenjeStavkaList[e.RowIndex].Calculated = (System.String)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
